import { createRouter, createWebHashHistory } from 'vue-router';
import type { RouteRecordSortRaw } from '@/router/type';

// @ts-ignore
import pages from '~pages';
console.log(pages);
const routes: Array<RouteRecordSortRaw> = [
  {
    path: '/',
    redirect: {
      name: 'form-base',
    },
  },
  ...pages,
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export const viewsRoutes = pages;
export default router;
